fix ship placement function