Some correctness fixen