Bug fixes and improvements (aka I forgot)