Fixed err 500 while selected query used in issue#show