Fixed bug in EaseInOut timing function