Added better handling of zero position