bug fixes after testing