Prevent invalid context errors when using white button