bug fix after testing