Trying to solve bug