Intermediate commit
Again fix #1

Half credit goes to Sharif