Error handling, bug fixes,