Fix more issues encountered by Tim Hang