temporary fix to solve bug in code