Quick fix for crashes while taking data from database