fixed bug with the placing ship. Some code optimized