Debug mode on. Some bug fixed