Added fixes and error log for #15