settings up
fixes some sql objects and queries