Fixed line numbers and added scope rule for new