Bug fixes after review