Code issues fixing