Fixes #991

Fixes #991

thanks to @edisonout for getting these