submitDelta in wrong part of if-else