Fixed many issues