Fix some warning
Fix error in position appropriation