Buges fixed for database