fixing several bugs + modal window resize function working