Database partially works