added necessary fixes