Fix dev mode
Fix random exceptions