Minor fixes to make checkbox work