Fixed small and annoying bugs