Code change to best practice

Nothing major just a small code change