fix for buttons not yet loaded bug