More bug fixes and #2