fixed #25. removed redundant checks