Revert "some fixes. thanks to @asquared for these"

This reverts commit 65ebbfbf04e8dfaca03c3e2de619b30da9e21543.
Revert "such fix. very again."

This reverts commit 3d5d37d0e3d2adebc39b6d86efc647291061ae9a.