Debugged some issues