corrections, bug fixing