Form bug fix + id sort fix for db entries