fixed #317