Fixed so the properties array will have the right order