FIXED most bugs