Fixed some bugs in dev mode