Fix #235-237, #241-245 Andy's bug list