Fix to stop frames from comitting twice.