Fixed warp function