derivative problem fixed