Fixing crash on finish