Yeah, that was the reason. I put super(x, y) after the loadGraphic() function. I made super(x, y) before loadGraphic() and that solved the problem.