Added a Bug DAO, fixed typoes with sql