This is the correct way to handle this situation.