WIP fixing bugs