fixing some bugs not working yet