Bug fixes discovered after testing