fix detection of png