Bug in permalink code
Fixed tablet portrait bug