Fixed bugs

Cleaner rendition