cleanup and hopefully fixed