Various bug fixes and what not...