Fixing random crash