Fixed to stop crashing