Fixed bug with null pointer in picturePath.