fixed bugs with selection. initial button actions are painting