Fixes from @deepankgupta -- thanks!