Fixed active panel bug. Fixes #153.