error fixing and debugging