Fixed, now it works almost as it should