Fixed noteces and errors in console