Fixed is_empty var and comparision op issues with 0, covered under test too