fixes argument handling in extend method - Issue #5