The mudguards are most likely not correctly installed. To test remove the mudguard(s) from the affected wheel(s) and if wheel stays on after removing mudguards they were incorrectly installed.
To fix, remove affected wheel(s) & mudguard(s). Slide the mudguard onto the frame. When the round part of the mudguard is postioned over the round section on the frame use the palm of you hand to exert downwards pressure onto the round part. There will be an audible click, when the mudguard is correctly installed.