The version in this commit functions properly