Fixed checking last position.