bug fixing to the max