Switching from list to grid properly moves actions

The button fix resolves #311