some crud fixes