removed orphan reference from sql