Correctly use bin variable