fixing some small code