one more fix and remove unneeded code