Clean up, important bug fix