small bug fixes and added erics schema in sql files