fix bug with show being called twice