Fixes after testing; Dropped nil support since it doesn't work well with lua.