connection closing and #placement.sql update