Fixed null-pointer exception when removing non-existent database entry