Fixed a casting error with configs