Fixed API search bug and extension now works fine if no entries in the database