Small bug-fixes