Fix bugs from milestone#2_refactoring -> develop merge