major bugs fixed