Fixed warning and errors.
Thanks!