Fixed bug in BButton code