Code improvement suggested by sinn3r