bug fixes - WIP