Tiny bugfix. Scrolling through the pictures was not possible anymore
Minor change to avoid a wrong database query

if I want to see if the connection to the arduino is lost, it is not
useful to read the database entrys when the connection is lost.
Thats why they are now ignored in database query.