Database little improvements