fixed query buttons click handling; last50 button