bug fixes
bugs found from running on linux