Merged changes from remote + small changes on error handling