Fixed php 5.3 compatability in string writer class
Fixed finding first array for keys