Fixed bugs
minor bug fixes