Hot fix for localStorage storing undefined value