Better path handeling