Iss530

partial fix for issue #530