Fixes based on james' comments