fixed problem that was allowing insertion of empty aliases in to the database and stopped unnecessary select queries when adding a new URL