small bug fixes when testing on emulator