fix end position