Deleted unnecessary code in before block