Fixes function, assert errors