fixed call to splitext