Fixed bug with PS1 wrapping