correct buttons behaviour