Fixed code bugs

Fixed code bugs