bug fix WIP