Settings: Fix crash and error

Signed-off-by: Chintan Shah <cgintan1998@gmail.com>