Commands over script providing different (wrong) result