Solved the bug