Added ButtonPress null check