Updated readme and fixed a bug